<?php
$this->load->view('user/head');
$this->load->view('common/header');
?>
<script type="text/javascript" src="<?php echo ASSET_URL; ?>js/jquery-1.10.2.js"></script>
<script>
$(document).ready(function(){
	$("#nom_form_submit_nominating").click(function(){
		
		<?php if(isset($form_list_nom)) {
				foreach($form_list_nom as $row){
				if($row['event_nomination_form_mandatory']=='Yes'){?>
			//		alert
				
				 if($("<?php echo "#".$row['master_nomination_form_name'];?>").val() ==""){
					 $('<?php echo "#".$row['master_nomination_form_name'].'_error'; ?>').html('<?php echo "Please enter ".strtolower($row['event_nomination_form_label']); ?>');
					$('<?php echo "#".$row['master_nomination_form_name'].'_error'; ?>').show(500);
					$('<?php echo "#".$row['master_nomination_form_name'].'_error'; ?>').delay(4000);
					$('<?php echo "#".$row['master_nomination_form_name'].'_error'; ?>').animate({
					height: 'toggle' 
					}, 500, function() {
					// Animation complete.
					});
					return false;
				<?php $flag1=FALSE; ?>
				 }else {
					 <?php $flag1=TRUE; ?>
				 }
			<?php }
			} if($flag1){?>
			$("#user_nomination_form").submit();
			<?php } }?>
		//$form_list[0]['event_nomination_form_id']
	});
});
</script>
<script>
$(document).ready(function(){
	$("#applicant_form_submit_nominee").click(function(){
		
		<?php if(isset($form_list)) { foreach($form_list as $row){
					if($row['event_nomination_form_mandatory']=='Yes'){ ?>
						
					 if($("<?php echo "#".$row['master_nomination_form_name'];?>").val() ==""){
					<?php if($row['master_nomination_form_type']=='dropdown' || $row['master_nomination_form_type']=='textarea'){?> 
							 $('<?php echo "#err-".$row['master_nomination_form_name']; ?>').html('<?php echo "Please enter ".strtolower($row['event_nomination_form_label']); ?>');
							$('<?php echo "#err-".$row['master_nomination_form_name']; ?>').show(500);
							$('<?php echo "#err-".$row['master_nomination_form_name']; ?>').delay(4000);
							$('<?php echo "#err-".$row['master_nomination_form_name']; ?>').animate({
							height: 'toggle' 
							}, 500, function() {
							// Animation complete.
							});
							return false;
					<?php }
					if($row['master_nomination_form_type']=='input'){?> 
					 $('<?php echo "#".$row['master_nomination_form_name'].'_error'; ?>').html('<?php echo "Please enter ".strtolower($row['event_nomination_form_label']); ?>');
						$('<?php echo "#".$row['master_nomination_form_name'].'_error'; ?>').show(500);
						$('<?php echo "#".$row['master_nomination_form_name'].'_error'; ?>').delay(4000);
						$('<?php echo "#".$row['master_nomination_form_name'].'_error'; ?>').animate({
						height: 'toggle' 
						}, 500, function() {
						// Animation complete.
						});
						return false;
					<?php }	?>		
					<?php $flag2=FALSE; ?>
					 }else {
						 <?php $flag2=TRUE; ?>
					 }
				<?php }
				} if($flag2){?>
				$("#user_nomination_nominee_form").submit();
				<?php } }?>
		//$form_list[0]['event_nomination_form_id']
	});
});
</script>

<div class="space40"></div>
<img src="<?php echo ASSET_URL . 'img/slider/02.jpg'; ?>" alt="">
<div class="container">
    <div class="row">
    	<div class="col-md-3 col-xs-12">
          <?php $this->load->view('user/nomination_left_part'); ?>
        </div>
        <div class="col-md-9 col-xs-12">
        	<div class="success_msg" id="err-top" style="font-size:14px;margin:10px 0 0 0;">
        		<?php if($this->session->userdata('user_form_complete') && $this->session->userdata('user_form_complete') != ''){
        			echo $this->session->userdata('user_form_complete');$this->session->unset_userdata('user_form_complete');
        		}else{ echo '&nbsp;';} ?>
        	</div>
		<!--form_details starts-->
        	<div id="nominating_div" style="<?php if(($this->session->userdata('user_form_next') && $this->session->userdata('user_form_next')=='nominating') || ($this->session->userdata('user_form_next1') && $this->session->userdata('user_form_next1')=='nominating')){ echo 'display:block';}else{ echo 'display:none';} ?>">
        		<?php $this->load->view('user/nomination_form_inner'); ?>
        	</div>
        	<div id="nominee_div" style="<?php if($this->session->userdata('user_form_next') && $this->session->userdata('user_form_next')=='nominee'){ echo 'display:block';}else{ echo 'display:none';} ?>;">
        		<?php $this->load->view('user/nomination_form_inner1'); ?>
        	</div>
        	<div id="dis_div" style="<?php if($this->session->userdata('user_form_next') && $this->session->userdata('user_form_next')=='disclosure'){ echo 'display:block';}else{ echo 'display:none';} ?>;">
        		<?php $this->load->view('user/nomination_form_inner2'); ?>
        	</div>
        <!--form_details ends-->
		</div>
    </div>
    <div class="clearfix"></div>
    <div class="space90"></div>  
</div> 
<div class="space30"></div>
<?php $this->session->unset_userdata('user_form_next');$this->session->unset_userdata('user_form_next1'); ?>
<?php $this -> load -> view('user/footer'); ?>